import request from '@/utils/request'

/**
 * 登录
 * @param {object} loginForm 登录表单
 */
export const loginAPI = (loginForm) => {
  return request({
    method: 'post',
    url: '/sys/login',
    data: loginForm
  })
}

/**
 * 获取用户信息
 */
export const getUserProfileAPI = () => {
  return request({
    method: 'get',
    url: '/sys/profile'
  })
}

/**
 * 修改密码
 * @param {object} pwdForm 密码表单
 */
export const putPwdAPI = (pwdForm) => {
  return request({
    method: 'put',
    url: '/sys/user/updatePass',
    data: pwdForm
  })
}
